Summary of Pearl 2014

Sex differences in weight gain (original Lord formulation)

Variables

  • weight time 1
  • weight time 2
  • weight change
  • sex

Issues

  • t-test on change vs. ancova
  • Statistician 1 concludes no difference in change
  • Statistician 2 concludes a difference in time 2 if controlling for time 1

Results

  • Both statisticians are correct
  • t-test on change = total effect
  • ancova = direct effect

DAG

Indirect effect: is a*c

Direct effect: b

Total effect: b + a*c - a

Data Example

library(dplyr)
group  = rep(c('B', 'A'), e=5)
pre = c(20,10,60,20,10,50,10,40,20,10)
post = c(70,50,90,60,50,20,10,30,50,10)

df = data.frame(id=factor(1:10), group, pre, post)
change = post-pre

dflong = tidyr::gather(df, key=time, value=score, pre:post) %>% arrange(id)
head(df)
  id group pre post
1  1     B  20   70
2  2     B  10   50
3  3     B  60   90
4  4     B  20   60
5  5     B  10   50
6  6     A  50   20
head(dflong)
  id group time score
1  1     B  pre    20
2  1     B post    70
3  2     B  pre    10
4  2     B post    50
5  3     B  pre    60
6  3     B post    90

It’s an extremely large group difference.

mod = "
  pre ~ a*group
  post ~ b*group + c*pre
  # change ~ -1*pre + 1*post
 
  # total effect
  TE := (b + a*c) - a
"

library(lavaan)
lpmod = sem(mod, data=df)

summary(lpmod)
lavaan (0.5-20) converged normally after  40 iterations

  Number of observations                            10

  Estimator                                         ML
  Minimum Function Test Statistic                0.000
  Degrees of freedom                                 0

Parameter Estimates:

  Information                                 Expected
  Standard Errors                             Standard

Regressions:
                   Estimate  Std.Err  Z-value  P(>|z|)
  pre ~                                               
    group      (a)   -2.000   11.027   -0.181    0.856
  post ~                                              
    group      (b)   41.053    7.490    5.481    0.000
    pre        (c)    0.526    0.214    2.454    0.014

Variances:
                   Estimate  Std.Err  Z-value  P(>|z|)
    pre             304.000  135.953    2.236    0.025
    post            139.789   62.516    2.236    0.025

Defined Parameters:
                   Estimate  Std.Err  Z-value  P(>|z|)
    TE               42.000    9.121    4.605    0.000
summary(lm(change~group, df))  # t-test on change scores = total effect

Call:
lm(formula = change ~ group, data = df)

Residuals:
   Min     1Q Median     3Q    Max 
   -28     -6      0      2     32 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)   -2.000      7.211  -0.277  0.78854   
groupB        42.000     10.198   4.118  0.00335 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 16.12 on 8 degrees of freedom
Multiple R-squared:  0.6795,    Adjusted R-squared:  0.6394 
F-statistic: 16.96 on 1 and 8 DF,  p-value: 0.003351
summary(lm(post~group+pre, df)) # 'ancova' uncovers direct effect etc.

Call:
lm(formula = post ~ group + pre, data = df)

Residuals:
    Min      1Q  Median      3Q     Max 
-16.632  -6.368  -3.737   4.947  29.158 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)  10.3158     9.1840   1.123  0.29838   
groupB       41.0526     8.9522   4.586  0.00253 **
pre           0.5263     0.2563   2.054  0.07912 . 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 14.13 on 7 degrees of freedom
Multiple R-squared:  0.776, Adjusted R-squared:  0.712 
F-statistic: 12.12 on 2 and 7 DF,  p-value: 0.005321

Aside

Use change score adjusting for pre. Identical result, but where coef for pre = ancova coef for pre -1


Call:
lm(formula = change ~ group + pre, data = df)

Residuals:
    Min      1Q  Median      3Q     Max 
-16.632  -6.368  -3.737   4.947  29.158 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)  10.3158     9.1840   1.123  0.29838   
groupB       41.0526     8.9522   4.586  0.00253 **
pre          -0.4737     0.2563  -1.848  0.10706   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 14.13 on 7 degrees of freedom
Multiple R-squared:  0.7846,    Adjusted R-squared:  0.7231 
F-statistic: 12.75 on 2 and 7 DF,  p-value: 0.004638

Treatment with confounding (Wainer & Brown)

Variables

  • weight time 1
  • weight time 2
  • weight change
  • table A vs. B

Issues

  • Heavier kids more likely to sit at table B
  • Two statisticians come the conclusions as before

Results

  • Weight time 1 is now a confounder
  • Arrow from time 1 to ‘treatment’
  • Statistician 1 is incorrect because they do not adjust
  • Statistician 2

Birth Weight Paradox

Variables

  • birthweight
  • smoking mom
  • infant mortality

Issues

  • No difference score
  • Before, focus on clash between two seemingly legitimate methods of analysis
  • Now using ancova but results seem implausible

Results

  • low birthweight children have higher mortality rate (100 fold higher)
  • children of smoking mothers notably more likely to have low birghtweight
  • low birthweight children born to smoking mothers have a lower mortality rate
  • Conclusion: expectant mothers should start smoking!

Results

Collider bias (explain away effect)

Explanation

Perspective 1

  • Controlling just for smoking leaves other causes, resulting in bias
  • Controlling for smoking changes the probability of other causes (due to BW collider) for any stratum of BW
  • Example: for BW=’low, if we compare smoking vs. non-smoking we are also comparing rare other causes vs. likely other causes

Perspective 2

  • Mediation context of previous: we want to know the mortality rate of babies e.g. smokers vs. non if BW controlled for
  • However here we have confounders, whereas before, the fundamental assumption was that there weren’t any.
  • Ajusting for BW doesn’t sever all paths traversing the mediator, and actually opens up a new path, and the effect is now spurious
  • For low BW, comparison of smoking vs. non-smoking compares no other causes vs. other causes